package com.tencent.sr.iris.activity.service.convert;

import cn.hutool.core.date.DateUtil;
import com.tencent.sr.iris.activity.repository.entity.TIrisUserActivityRecordDO;
import com.tencent.sr.iris.activity.repository.entity.TIrisUserTaskRecordDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.Date;
import java.util.Objects;
import java.util.Optional;

/**
 * @author xiaojun
 */
@Mapper(componentModel = "spring", imports = {Date.class, Objects.class, Optional.class, DateUtil.class})
public interface UserActivityRecordConvert {

    @Mapping(target = "id", expression = "java(null)")
    @Mapping(target = "bizId", expression = "java(null)")
    TIrisUserActivityRecordDO buildActivityRecord(TIrisUserTaskRecordDO taskRecord);

}
